<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

<script type="text/javascript">
			dojo.event.topic.subscribe("/save", function(data, type, request) {
			    if(type == "load") {
					dojo.byId("name").value = "";
					dojo.byId("url").value = "";
				}
			});

			dojo.event.topic.subscribe("/edit", function(data, type, request) {
			    if(type == "before") {
					var id = data.split("_")[1];

					var tr = dojo.byId("row_"+id);
					var tds = tr.getElementsByTagName("td");

					//dojo.byId("id").value = id;
					dojo.byId("name").value = dojo.string.trim(dojo.dom.textContent(tds[0]));
					dojo.byId("url").value = dojo.string.trim(dojo.dom.textContent(tds[1]));
				}
			});
		</script>

<s:form action="menutree_menu_edit">
	编号：<s:property value="menu.id"/>
	<s:textfield name="menu.name" label="名称"></s:textfield>
	<s:textfield name="menu.url" label="URL" ></s:textfield>
	<sx:submit  notifyTopics="/save" targets="inputFields" label="保存"/>
</s:form>